import request from '@/utils/request'

import variable from '@/utils/variables'
const baseURL = variable.URL.baseURL

// 云工厂信息
export function getFactoryInfo(query) {
  return request({
    baseURL: baseURL,
    url: '/factory/frontend/factory/select_one',
    method: 'GET',
    params: query
  })
}

// 云工厂商品
export function getFactoryGoods(query) {
  return request({
    baseURL: baseURL,
    url: '/product/qd_product_list',
    method: 'GET',
    params: query
  })
}

// 云工厂类目
export function getFactoryClassify(query) {
  return request({
    baseURL: baseURL,
    url: '/product/front/classify/custom_list',
    method: 'GET',
    params: query
  })
}
// 云工厂类目
export function getFactoryClassifyBottom(query) {
  return request({
    baseURL: baseURL,
    url: '/product/front/classify/promotion/bottom',
    method: 'GET',
    params: query
  })
}



// 云工厂banner图
export function getFactoryBanner(query) {
  return request({
    baseURL: baseURL,
    url: '/factory_decoration/frontend/banner/select',
    method: 'GET',
    params: query
  })
}

// 云工厂数量
export function getFactoryNum(query) {
  return request({
    baseURL: baseURL,
    url: '/factory/frontend/factory/count',
    method: 'GET',
    params: query
  })
}

// 云工厂收藏
export function factoryFavorites(query) {
  return request({
    baseURL: baseURL,
    url: '/favorites/factory',
    method: 'POST',
    data: query
  })
}

// 云工厂取消收藏
export function factoryFavoritesCancel(query) {
  return request({
    baseURL: baseURL,
    url: '/favorites/factory/cancel',
    method: 'DELETE',
    params: query
  })
}
// 是否收藏云工厂
export function factoryFavoritesCount(query) {
  return request({
    baseURL: baseURL,
    url: '/favorites/factory/count',
    method: 'GET',
    params: query
  })
}


// 云工厂装修
// BANNER
export function getFactoryBannerSelect(query) {
  return request({
    baseURL: baseURL,
    url: '/factory_decoration/frontend/banner/select',
    method: 'GET',
    params: query
  })
}
// 店招
export function getFactorySignBoard(query) {
  return request({
    baseURL: baseURL,
    url: '/factory_decoration/frontend/sign_board/select',
    method: 'GET',
    params: query
  })
}
// 热销商品查询（新）
export function getFactoryPromotion(query) {
  return request({
    baseURL: baseURL,
    url: '/product/front/promotion/select_list',
    method: 'GET',
    params: query
  })
}
// 推荐品类
export function getFactoryClassifyCustom(query) {
  return request({
    baseURL: baseURL,
    url: '/product/front/classify/promotion/recommend',
    method: 'GET',
    params: query
  })
}

// 推荐品类的商品
export function getFactoryProducts(query) {
  return request({
    baseURL: baseURL,
    url: '/product/front/product_list',
    method: 'GET',
    params: query
  })
}

// 云工厂类型
export function getFactoryTemplateType(query) {
  return request({
    baseURL: baseURL,
    url: '/factory_decoration/frontend/factory_template/select',
    method: 'GET',
    params: query
  })
}
